<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>创客手机网站</title>
  <script src="/wap/js/flexible.js"></script>
  <script src="/wap/js/jquery-3.2.1.min.js"></script>
  <script src="/wap/js/util.js"></script>
  <link rel="stylesheet" href="/wap/css/style.css">
  <style>
    html {
      background: #f3f5f7;
    }
  </style>
</head>
<body>
  <div id="list">
    <div class="list__user">
      @if($isEmpty)
      <p style="font-size: 0.43rem;color: #666666;margin-top: 3rem;text-align: center;">您还没有创客帐号</p>
      @endif
      @foreach($data as $v)
      <div class="user" onclick="selChk('{{ $v->id }}','{{ $v->status }}')">
        <div class="user__top clearfix">
          <div class="user__top__avatar">
            @if($v->head_image_path)
            <img src="{{ $v->head_image_path }}" alt="">
            @else
              <img src="/wap/image/logo.png" alt="">
            @endif
          </div>
          <div class="user__top__info">
            <div class="info__name" >{{ $v->name }} ID:<span style="color: red">{{ $v->id }}</span></div>
            <div class="info__type">@if($v->user_type==1) 创客 @else 城市合伙人 @endif</div>
          </div>
        </div>
        <div class="user__bottom clearfix">
          <div class="box user__bottom__points">
            <div class="value">{{ $v->integral }}</div>
            <div class="type">我的积分</div>
            <div class="bor-gray"></div>
          </div>
          <div class="box user__bottom__reg">
            <div class="value">{{ $v->registered_currency }}</div>
            <div class="type">注册币</div>
            <div class="bor-gray"></div>
          </div>
          <div class="box user__bottom__reg">
            <div class="value">{{ ($v->entrepreneurship_achievement+$v->chuangheng_achievement+$v->director_achievement)/10000 }}万</div>
            <div class="type">我的业绩</div>
          </div>

          <div class="user__bottom">
            <div class="box user__bottom__points">
              <div class="value">{{ $v->freeze_integral }} </div>
              <div class="type">待结算积分</div>
              <div class="bor-gray"></div>
            </div>
            <div class="box user__bottom__reg">
              <div class="value">{{ $v->freeze_registered_currency }}</div>
              <div class="type">待结算注册币</div>
              <div class="bor-gray"></div>
            </div>
            <div class="box user__bottom__reg">
              <div class="value">{{ $v->referee_num }}</div>
              <div class="type">我推荐的</div>
            </div>
          </div>
        </div>
      </div>
      @endforeach
    </div>
  </div>
</body>
</html>

<script>
  function selChk(user_id,status) {
      if(status==2){
          toast('帐号被禁用',1000);
          return false;
      }
      if(status==3){
          toast('帐号已过期',1000);
          return false;
      }
      window.location.href = '/wap/index/detail/'+user_id;
  }
</script>